import com.mapper.PersonMapper;
import com.mapper.UsersMapper;
import com.pojo.Users;
import com.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class UsersTest {
    @Test
    public void findUsersTest() {
        SqlSession session = MyBatisUtils.getSession();
        Users users=session.selectOne("com.mapper.UsersMapper.findUserwithOrders",1);
        System.out.println(users);
        session.close();
    }
    @Test
    public void selectUsersByIdTest() {
        SqlSession session = MyBatisUtils.getSession();
        UsersMapper mapper = session.getMapper(UsersMapper.class);
        Users users=mapper.selectUsersById(1);
        System.out.println(users.toString());
        session.close();
    }
}
